package org.oschina.plugin;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;

import org.oschina.plugin.bean.PluginBean;

public class PluginComparator implements Comparator<PluginBean> {

	private final static PluginComparator comparator=new PluginComparator();
	
	@Override
	public int compare(PluginBean plugin_1,PluginBean plugin_2)
	{
		return plugin_1.getOrder()-plugin_2.getOrder();
	}
	
	public static List sort(List list)
	{
		Collections.sort(list,comparator);
		return list;
	}
}